describe("App.api_alp",function(){
    var t_session;
    var t_transfer;
    var response;
    beforeEach(function(){
        t_session = App.getSession();
        t_transfer = App.getSession().getCurrentTransfer();
        response ={
            etacResponse : {
                responseHeader : {
                    status : 1,
                    errorMessage : 'error'
                },
                authorization : {
                    status : 1
                }
            }
        };
        var callback = jasmine.createSpy('callbackResendOTP');
        App.api_alp.callbackResendOTP = callback;

    });
    it("success response", function() {
        App.api_alp._processResendOTP(response);

        expect(App.api_alp.callbackResendOTP).toHaveBeenCalledWith(null);
    });

    it('error response', function() {
        spyOn(bsoi, 'validateResponse').andThrow(BreezeException.create());

        App.api_alp._processResendOTP(response);
        expect(App.api_alp.callbackResendOTP).toHaveBeenCalledWith(jasmine.any(BreezeException));
    });


});